package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.system.domain.*;
import com.ruoyi.system.domain.vo.BywDeliverPositionType;
import com.ruoyi.system.domain.vo.ExtenUserQuery;
import com.ruoyi.system.domain.vo.ViteaQuery;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.system.mapper.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.service.IBywTiktokUserService;

/**
 * 用户简历库Service业务层处理
 *
 * @author ruoyi
 * @date 2024-05-25
 */
@Service
public class BywTiktokUserServiceImpl implements IBywTiktokUserService
{
    @Autowired
    private BywTiktokUserMapper bywTiktokUserMapper;

    protected final Logger logger = LoggerFactory.getLogger(this.getClass());

    /**
     * 查询用户简历库
     *
     * @param tiktokUserId 用户简历库主键
     * @return 用户简历库
     */
    @Override
    public BywTiktokUser selectBywTiktokUserByTiktokUserId(Long tiktokUserId)
    {
        return bywTiktokUserMapper.selectBywTiktokUserByTiktokUserId(tiktokUserId);
    }

    @Override
    public BywTiktokUser selectBywTiktokUserByTiktokPhone(String phone)
    {
        return bywTiktokUserMapper.selectBywTiktokUserByTiktokPhone(phone);
    }


    @Override
    public BywTiktokUser lastBywTiktokUserByTiktokPhone(String phone)
    {
        return bywTiktokUserMapper.lastBywTiktokUserByTiktokPhone(phone);
    }

    /**
     * 查询用户简历库列表
     *
     * @param bywTiktokUser 用户简历库
     * @return 用户简历库
     */
    @Override
    public List<BywTiktokUser> selectBywTiktokUserList(BywTiktokUser bywTiktokUser)
    {
        return bywTiktokUserMapper.selectBywTiktokUserList(bywTiktokUser);
    }

    @Override
    public List<BywTiktokUser> selectBywTiktokUserListByXcxId(BywTiktokUser bywTiktokUser)
    {
        return bywTiktokUserMapper.selectBywTiktokUserListByXcxId(bywTiktokUser);
    }

    @Override
    public List<BywTiktokUser> selectBywTiktokUserListUserPhones(String[] userPhones)
    {
        return bywTiktokUserMapper.selectBywTiktokUserListUserPhones(userPhones);
    }

    @Override
    public List<BywDeliverPositionType> selectDeliverPositionType(String[] userPhones)
    {
        return bywTiktokUserMapper.selectDeliverPositionType(userPhones);
    }
    /**
     * 新增用户简历库
     *
     * @param bywTiktokUser 用户简历库
     * @return 结果
     */
    @Override
    public int insertBywTiktokUser(BywTiktokUser bywTiktokUser)
    {
        bywTiktokUser.setCreateTime(DateUtils.getNowDate());
        return bywTiktokUserMapper.insertBywTiktokUser(bywTiktokUser);
    }

    /**
     * 修改用户简历库
     *
     * @param bywTiktokUser 用户简历库Long tiktokUserId
     * @return 结果
     */
    @Override
    public int updateBywTiktokUser(BywTiktokUser bywTiktokUser)
    {
        bywTiktokUser.setUpdateTime(DateUtils.getNowDate());
        return bywTiktokUserMapper.updateBywTiktokUser(bywTiktokUser);
    }

    @Override
    public int unlockBywTiktokUser(Long tiktokUserId)
    {
        return bywTiktokUserMapper.unlockBywTiktokUser(tiktokUserId);
    }

    /**
     * 批量删除用户简历库
     *
     * @param tiktokUserIds 需要删除的用户简历库主键
     * @return 结果
     */
    @Override
    public int deleteBywTiktokUserByTiktokUserIds(Long[] tiktokUserIds)
    {
        return bywTiktokUserMapper.deleteBywTiktokUserByTiktokUserIds(tiktokUserIds);
    }

    /**
     * 删除用户简历库信息
     *
     * @param tiktokUserId 用户简历库主键
     * @return 结果
     */
    @Override
    public int deleteBywTiktokUserByTiktokUserId(Long tiktokUserId)
    {
        return bywTiktokUserMapper.deleteBywTiktokUserByTiktokUserId(tiktokUserId);
    }

    @Override
    public List<BywTiktokUser> selectTiktokMangerUserList(ExtenUserQuery extenUserQuery) {
        return bywTiktokUserMapper.selectTiktokMangerUserList(extenUserQuery);
    }
}
